Skip to content

Conversation

jsouter
Copy link
Contributor

@jsouter jsouter commented Oct 6, 2025

Closes #228

Small fix needed due to changes in logging messages that softioc system tests wait for before timing out. Also have removed src from the doctests for now as the Tracer docstring was being collected and failing under pytest.

@jsouter jsouter requested a review from GDYendell October 6, 2025 15:05
# we need to capture log messages from transport
logger = _logger.bind(logger_name="fastcs.transport.epics.ca.transport")
logger.add(print) # forward log messages to stdout

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is all that is required

diff --git a/tests/conftest.py b/tests/conftest.py
index df850933..0af1e703 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -15,13 +15,12 @@ from uuid import uuid4
 
 import pytest
 from aioca import purge_channel_caches
-from loguru import logger as _logger
 from softioc import builder
 
 from fastcs.attributes import AttrR, AttrRW, AttrW
 from fastcs.datatypes import Bool, Float, Int, String
 from fastcs.launch import build_controller_api
-from fastcs.logging import LogLevel, configure_logging
+from fastcs.logging import logger
 from fastcs.transport.tango.dsr import register_dev
 from tests.assertable_controller import MyTestAttributeIORef, MyTestController
 from tests.example_p4p_ioc import run as _run_p4p_ioc
@@ -88,10 +87,9 @@ def _run_ioc_as_subprocess(
     error_queue: multiprocessing.Queue,
     stdout_queue: multiprocessing.Queue,
 ):
-    configure_logging(LogLevel.INFO)
     # we need to capture log messages from transport
-    logger = _logger.bind(logger_name="fastcs.transport.epics.ca.transport")
     logger.add(print)  # forward log messages to stdout
+    logger.enable("fastcs")
 
     try:
         from pytest_cov.embed import cleanup_on_sigterm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It still hangs on my end with this fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix startup of IOC system tests

2 participants